-----------------------------------------------------
--created:Son nguyen van
--created_date:08/06/2013
--desc: proc order full
--exec pr_order 2,1
create proc pr_order
	@order_id int,
	@language_id int
as
	select a.order_id,a.order_date,
		   a.customer_id,a.created_date,
		   a.full_name,a.address,
		   a.phone,a.mobile,
		   a.email,a.district,
		   a.prencint,a.city,
		   a.total,a.comment,
		   a.payment_status,a.payment_type,
		   a.admin_id,a.user_id,a.is_pay,		   
		   b.product_id,
		   b.quantity,b.price_value,
		   c.product_name,
		   c.product_alias,
		   d.price,
		   c.language_id,
		   d.images
	from tbl_order a left outer join tbl_order_detail b on a.order_id = b.order_id
					 inner join tbl_product d on b.product_id = d.product_id
					 inner join tbl_product_item c on b.product_id = c.product_id
	where a.order_id = @order_id and c.language_id = @language_id
go


